package com.ken.autocode.tools.generator.config;

import java.util.HashMap;
import java.util.Map;

/**
 *@description:config message
 */
public class ConfigInfo {
    //库名+连接密码
    public static  String DB_URL      = "jdbc:mysql://127.0.0.1:3306/qyxt";
    public static  String DB_USERL    = "root";
    public static  String DB_PWD      = "root";

    //项目名
    public static  String PRO_NAME = "project";

    //版本
    public static  String VERSION = "V1.0";
    //头部内容
    public static  String TITLE = "/**************** 版权所有：************************/";
    //作者
    public static  String AUTHOR   = "admin";

    //项目位置（自己存放代码的位置，注意指定到项目代码的根目录）
    public static  String PRO_SITE = "D:\\ken-code-test";

    // 顶层包名
    public static  String TOP_LEVEL   = "com.code.test";

    // 模块名(多层级直接加上  .[子模块名称]  例如：oa、pm等)
    public static  String MODULE_NAME = "";

    /**无需配置-------start**/
    public static  String Entity_FOLEDR = "entity";
    public static  String SIMPL_FOLDER = "service\\impl";
    public static  String SINFE_FOLEDR = "service";
    public static  String DAO_FOLEDR = "mapper";
    public static  String DAO_IMPL_FOLEDR = "mapper\\sqlmap";
    public static  String CONTROLLER_FOLEDR = "controller";
    public static  String  pkColom;
    /**无需配置-------end**/

    /**页面文件后缀名称start**/
    public static  String VIEW_SUFFIX= ".jsp";
    /**页面文件后缀名称end**/


    /**模板文件信息start**/
    public static Map<String,String[]> templatefileMap;
    /**模板文件信息end**/

    //从实体层到controller层 再到实体列表 js 新增修改页面 新增修改js
    private final static String [] templateName =new String []{"Entity.tpl","Mapper.tpl","MapperXML.tpl",
            "Service.tpl","ServiceImpl.tpl","Controller.tpl","ViewList.tpl","ListJs.tpl","ViewUpdate.tpl","UpdateJs.tpl","Other.tpl"};

    //从实体层到controller层 再到实体列表 js 新增修改页面 新增修改js
    private final static String [] templateSufix =new String []{".java","Mapper.java","Mapper.xml",
            "Service.java","ServiceImpl.java","Controller.java","_list"+VIEW_SUFFIX,"_list.js","_update"+VIEW_SUFFIX,"_update.js","_Other.txt"};


    //java 文件的根目录
    public static  String JAVAFODER = "\\src\\main\\java\\";

    //视图页面 文件的根目录
    public static  String VIEWFOLDER = "\\src\\main\\webapp\\view\\";

    static {
        templatefileMap =new HashMap<String, String[]>();
        templatefileMap.put("name",templateName);
        templatefileMap.put("sufix",templateSufix);
    }

}
